package com.spring.demo12.eg4;

import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * @author vhans
 */
@Component
public class SendEmailListener implements ApplicationListener<UserRegisterEvent> {
    @Override
    public void onApplicationEvent(UserRegisterEvent userRegisterEvent) {
        System.out.printf("给用户「%s」发送注册成功的邮件\n", userRegisterEvent.getName());
    }
}
